package cn.agiledata.bank.linkbank.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class WebPayRequestForm extends ActionForm {

    private String version;

    private String merchantId;

    private String subAccountId;

    private String merchantUrl;

    private String orderId;

    private String transId;

    private String currencyType;

    private String amount;

    private String responseMode;

    private String assuredPay;

    private String time;

    private String remark;

    private String merchantParam;

    private String mac;

    private String debitName;

    private String debit;

    private String bankCode;

    private boolean b2b;

    private String license;

    private String commodity;

    private String orderUrl;
    private String theId;
    
    private String sign;
    
    public String getAmount() {
        return this.amount;
    }

    public String getBankCode() {
        return this.bankCode;
    }

    public String getCurrencyType() {
        return this.currencyType;
    }

    public String getDebit() {
        return this.debit;
    }

    public String getDebitName() {
        return this.debitName;
    }

    public String getLicense() {
        return this.license;
    }

    public String getMac() {
        return this.mac;
    }

    public String getMerchantId() {
        return this.merchantId;
    }

    public String getMerchantParam() {
        return this.merchantParam;
    }

    public String getMerchantUrl() {
        return this.merchantUrl;
    }

    public String getOrderId() {
        return this.orderId;
    }

    public String getRemark() {
        return this.remark;
    }

    public String getResponseMode() {
        return this.responseMode;
    }

    public String getSubAccountId() {
        return this.subAccountId;
    }

    public String getTime() {
        return this.time;
    }

    public String getTransId() {
        return this.transId;
    }

    public String getVersion() {
        return this.version;
    }

    public String getAssuredPay() {
        return this.assuredPay;
    }

    public boolean isAssured() {
        return Boolean.valueOf(this.assuredPay).booleanValue();
    }

    public boolean isB2b() {
        return this.b2b;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public void setAssuredPay(String assuredPay) {
        this.assuredPay = assuredPay;
    }

    public void setAssured(boolean assuredPay) {
        this.assuredPay = String.valueOf(assuredPay);
    }

    public void setB2b(boolean b2b) {
        this.b2b = b2b;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }

    public void setCurrencyType(String currencyType) {
        this.currencyType = currencyType;
    }

    public void setDebit(String debit) {
        this.debit = debit;
    }

    public void setDebitName(String debitName) {
        this.debitName = debitName;
    }

    public void setLicense(String license) {
        this.license = license;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public void setMerchantId(String accountId) {
        this.merchantId = accountId;
    }

    public void setMerchantParam(String merchantParam) {
        this.merchantParam = merchantParam;
    }

    public void setMerchantUrl(String merchantUrl) {
        this.merchantUrl = merchantUrl;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setResponseMode(String responseMode) {
        this.responseMode = responseMode;
    }

    public void setSubAccountId(String subAccountId) {
        this.subAccountId = subAccountId;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public void setTransId(String transId) {
        this.transId = transId;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getCommodity() {
        return this.commodity;
    }

    public void setCommodity(String commodity) {
        this.commodity = commodity;
    }

    public String getOrderUrl() {
        return this.orderUrl;
    }

    public void setOrderUrl(String orderUrl) {
        this.orderUrl = orderUrl;
    }

    public String getTheId() {
		return theId;
	}

	public void setTheId(String theId) {
		this.theId = theId;
	}
	

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public void reset(ActionMapping mapping, HttpServletRequest request) {
        if (request.getParameter("license") == null) {
            this.amount = null;
            this.assuredPay = "";
            this.b2b = false;
            this.bankCode = null;
            this.currencyType = null;
            this.debit = null;
            this.debitName = null;
            this.mac = null;
            this.merchantId = null;
            this.merchantParam = null;
            this.merchantUrl = null;
            this.orderId = null;
            this.remark = null;
            this.responseMode = null;
            this.subAccountId = null;
            this.time = null;
            this.transId = null;
            this.version = null;
            this.commodity = null;
            this.orderUrl = null;
            this.sign = null;
        }
    }

}
